package com.grape.dp.handler.mapper;

import com.grape.dp.handler.mapper.entity.GatewayHandlerEntity;
import org.apache.ibatis.annotations.Select;
/**
 * 描述:GatewayHandlerMapper
 * @author: myx
 * @date: 2019/7/22 0022
 * Copyright © 2019-grape. All rights reserved.
 */
public interface GatewayHandlerMapper {

    /**
     * 获取第一个GatewayHandler
     * @return
     */
    @Select("SELECT  handler_name AS handlerName,handler_id AS handlerid ,prev_handler_id AS prevhandlerid ,next_handler_id AS nexthandlerid  FROM gateway_handler WHERE  prev_handler_id is null")
    public GatewayHandlerEntity getFirstGatewayHandler();

    @Select("SELECT  handler_name AS handlerName,handler_id AS handlerid ,prev_handler_id AS prevhandlerid ,next_handler_id AS nexthandlerid   FROM gateway_handler WHERE  handler_id=#{handlerId}")
    public GatewayHandlerEntity getByHandler(String handlerId);

}

